﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MISAPP.MISInterface;

public partial class View_CIB_CIB004 : ViewMatrix
{
    protected void Page_Load(object sender, EventArgs e)
    {
        limit();
        criteriaList = new string[] { "Criteria", "ExclusiveOfAccount","YYYYMM" };
        serviceName = "MISAPP.Classify.Service.Service_CIB004";
        if (!IsPostBack)
        {
            FillCriteria("GetCriteriaData", "SetData");
        }
    }

    protected void btn_Execute_Click(object sender, EventArgs e)
    {
        Execute();
        Server.Transfer("CIB004_1.aspx");
    }

    
    protected void Execute()
    {
        List<iSelectList> CriteriaList = GetSelectCLB();
        Session["Criteria"] = CriteriaList;
        Session["ExclusiveOfAccount"] = Utility.GetExclusiveAccont(chk_公庫.GetSelectValue());
        string strYM = string.Empty;
        foreach (iSelectList sel in CriteriaList)
        {
            if (sel.GetField().Length > 4)
            {
                if (sel.GetField().Substring(0, 4).Equals("YYYY"))
                {
                    string[] yms = sel.GetListArray();
                    strYM = yms[0];
                }
            }
        }
        Session["YYYYMM"]= strYM;
        Session["PageSize"] = ddlGVPageSizeSelect1.GetSelectPageSize();
    }

}
